// 全部bar
export const tabBarList = [{
	pagePath: "/pages/index/index",
	iconPath: "/static/tduck/tabbar/home.png",
	selectedIconPath: "/static/tduck/tabbar/home-o.png",
	text: "首页"
}, {
	pagePath: "/pages/home/index",
	iconPath: "/static/tduck/tabbar/work.png",
	selectedIconPath: "/static/tduck/tabbar/work-o.png",
	text: "工作台"
}, {
	pagePath: "/pages/form/index",
	iconPath: "/static/tduck/tabbar/completed.png",
	selectedIconPath: "/static/tduck/tabbar/completed-o.png",
	text: "表单"
}, {
	pagePath: "/pages/me/index",
	iconPath: "/static/tduck/tabbar/me.png",
	selectedIconPath: "/static/tduck/tabbar/me-o.png",
	text: "我的"
}]


// 过滤出拥有的tabbar
export function getTabBarList(data) {
	if (data && data.configValue && data.configValue.tabBarList) {
		const paths = data.configValue.tabBarList.map(item => item.pagePath)
		return tabBarList.filter(item => paths.includes(item.pagePath))
	}
	return []
}




